package scau.jump.securitytrace.ui;

import scau.jump.securitytrace.cache.UserCache;

public class MainFrameFactory {

	private static MainFrame mainFrame = null;
	private static String currentAccount = UserCache.accountMap.get("account");
	private static long roleId = UserCache.userMap.get(currentAccount).getId();
	
	public static synchronized MainFrame getMainFrame(){
		if(mainFrame == null){
			if(1 == roleId){
				mainFrame = new MainFrame1();
			}
			else{
				mainFrame = new MainFrame2();
			}
		}
		return mainFrame;
	}
}
